function compileNavigationController(self)
{
    self.NavigationController = Class.create(
    {
        /**
         * Constructor.
         * 
         * @param navigationContainerRange The range of coordinates specifying the size of the navigation container.
         * @param containerDivId The entire navigation container.
         * @param mapNavId The map button.
         * @param eventsNavId The events button.
         * @param settingsNavId The settings button.
         * @param mapController The map controller.
         * @param eventsController The events controller.
         * @param settingsController The settings controller.
         */
        initialize: function(navigationContainerRange, containerDivId, mapNavId, eventsNavId, settingsNavId, mapController, eventsController, settingsController)
        {
            // Get reference to buttons.
            var mapBtn = jQuery('#' + mapNavId);
            var eventsBtn = jQuery('#' + eventsNavId);
            var settingBtn = jQuery('#' + settingsNavId);
            
            // Set properties.
            this.mapController = mapController;
            this.eventsController = eventsController;
            this.settingsController = settingsController;
            
            // Bind onclick handlers.
            mapBtn.click(
               function(self)
               {
                   return function()
                   {
                       self.showMap();
                       return false;
                   };
               }(this));
            eventsBtn.click(
               function(self)
               {
                   return function()
                   {
                       self.showEvents();
                       return false;
                   };
               }(this));
             settingBtn.click(
               function(self)
               {
                   return function()
                   {
                       self.showSettings();
                       return false;
                   };
               }(this));
               
            // Setup navigation container.
            this.navigationContainer = new NavigationContainer(navigationContainerRange, containerDivId, mapNavId, eventsNavId, settingsNavId);
        },
        
        /**
         * Shows the map.
         */
        showMap: function()
        {
        	this.mapController.show();
        	this.eventsController.hide();
            this.settingsController.hide();
        },
        
        /**
         * Shows the events.
         */
        showEvents: function()
        {
            this.mapController.hide();
            this.eventsController.show();
            this.settingsController.hide();
        },
        
        /**
         * Shows the settings.
         */
        showSettings: function()
        {
            this.mapController.hide();
            this.eventsController.hide();
            this.settingsController.show();
        }
    });
}